import fetch from "./request.js";

// 分页查询农户求助
export function pageFarmSeek(data) {
  return fetch("/nb-pc/1.0.1/FarmNetService/pageFarmSeek", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 分页查询农事服务
export function pageFarmWork(data) {
  return fetch("/nb-pc/1.0.1/FarmNetService/pageFarmWork", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 新增农户求助
export function addFarmSeek(data) {
  return fetch("/nb-pc/1.0.1/FarmNetService/addFarmSeek", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 新增农事服务
export function addFarmWork(data) {
  return fetch("/nb-pc/1.0.1/FarmNetService/addFarmWork", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 修改农户求助
export function updateFarmSeek(data) {
  return fetch("/nb-pc/1.0.1/FarmNetService/updateFarmSeek", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 修改农事服务
export function updateFarmWork(data) {
  return fetch("/nb-pc/1.0.1/FarmNetService/updateFarmWork", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 删除农户求助
export function deleteFarmSeek(data) {
  return fetch("/nb-pc/1.0.1/FarmNetService/deleteFarmSeek", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 删除农事服务
export function deleteFarmWork(data) {
  return fetch("/nb-pc/1.0.1/FarmNetService/deleteFarmWork", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 查询农户求助详情
export function detailFarmSeek(data) {
  return fetch("/nb-pc/1.0.1/FarmNetService/detailFarmSeek", {
    method: "post",
    data: data,
    headers:{
      "Content-Type":"application/json; charset=utf-8"
    },
    withLoading: true,
  });
}
// 查询农事服务详情
export function detailFarmWork(data) {
  return fetch("/nb-pc/1.0.1/FarmNetService/detailFarmWork", {
    method: "post",
    data: data,
    headers:{
      "Content-Type":"application/json; charset=utf-8"
    },
    withLoading: true,
  });
}
// 导出农户求助
export function exportFarmSeek(data) {
  return fetch("/nb-pc/1.0.1/FarmNetService/exportFarmSeek", {
    method: "post",
    data: data,
    responseType: "blob",
    noInterceptors:true,//配置下载不走拦截器
    withLoading: true,
  });
}
// 导出农事服务
export function exportFarmWork(data) {
  return fetch("/nb-pc/1.0.1/FarmNetService/exportFarmWork", {
    method: "post",
    data: data,
    withLoading: true,
    responseType: "blob",
    noInterceptors:true
  });
}

// 上架农户求助
export function pushFarmSeek(data) {
  return fetch("/nb-pc/1.0.1/FarmNetService/pushFarmSeek", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 上架农事服务
export function pushFarmWork(data) {
  return fetch("/nb-pc/1.0.1/FarmNetService/pushFarmWork", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 下架农户求助
export function unpushFarmSeek(data) {
  return fetch("/nb-pc/1.0.1/FarmNetService/unpushFarmSeek", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 下架农事服务
export function unpushFarmWork(data) {
  return fetch("/nb-pc/1.0.1/FarmNetService/unpushFarmWork", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 推荐农户求助
export function recommendFarmSeek(data) {
  return fetch("/nb-pc/1.0.1/FarmNetService/recommendFarmSeek", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 推荐农事服务
export function recommendFarmWork(data) {
  return fetch("/nb-pc/1.0.1/FarmNetService/recommendFarmWork", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 取消推荐农户求助
export function unrecommendFarmSeek(data) {
  return fetch("/nb-pc/1.0.1/FarmNetService/unrecommendFarmSeek", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 取消推荐农事服务
export function unrecommendFarmWork(data) {
  return fetch("/nb-pc/1.0.1/FarmNetService/unrecommendFarmWork", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
